#include "StatusBar.h"
#include "ui_StatusBar.h"
#include "Include/IconProvider.h"

StatusBar::StatusBar(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::StatusBar)
{
    ui->setupUi(this);
    ui->closeBtn->setIcon(IconProvider::instance()->icon("window-close"));
    connect(ui->closeBtn, SIGNAL(clicked()), SIGNAL(closeRequest()));
    connect(ui->editWidgetsBtn, SIGNAL(clicked()), SIGNAL(switchWidgets()));
    connect(ui->editTabOrderBtn, SIGNAL(clicked()), SIGNAL(switchTabOrder()));
    connect(ui->editBuddiesBtn, SIGNAL(clicked()), SIGNAL(switchBuddies()));
    ui->modifyLbl->setVisible(false);
}

StatusBar::~StatusBar()
{
    delete ui;
}

void StatusBar::setFileName(const QString & fileName)
{
    ui->fileName->setText(fileName);
}

void StatusBar::setModify(bool modify)
{
    ui->modifyLbl->setVisible(modify);
}
